@extends('layout')

@section('content')
    <link rel="stylesheet" href="{{asset('css/about.css')}}">
    <link rel="stylesheet" href="{{asset('css/transaction.css')}}">
    <div class="container transaction-content">
        <div class="content-row">
            <div class="row info">
                <div class="col-sm-4">
                    @component('gongao',['gonggao'=>$gonggao])
                    @endcomponent
                </div>
                <div class="col-sm-8">
                    <div class="box">
                        <div class="title">
                            船舶交易价格指数
                        </div>
                        <div id="echart-one" class="echat">

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row info">
            <div class="col-sm-6">
                <div class="box">
                    <div class="title">
                        求购详情
                    </div>
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <th scope="col">船舶类型</th>
                            <th scope="col">载重吨（吨）</th>
                            <th scope="col">船龄（年）</th>
                            <th scope="col">发布日期</th>
                        </tr>
                        </thead>
                        <tbody>
                        @foreach($solding as $item)
                            <tr>
                                <th scope="row">{{$item->type}}</th>
                                <td>{{$item->loads}}</td>
                                <td>{{$item->old}}</td>
                                <td>{{$item->creat_at}}</td>
                            </tr>
                        @endforeach
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="col-sm-6">
                {{--<div class="part-title-box">--}}
                    {{--<div class="part-title">出售详情</div>--}}
                {{--</div>--}}
                <div class="box">
                    <div class="title">
                        出售详情
                    </div>
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <th scope="col">船舶类型</th>
                            <th scope="col">载重吨（吨）</th>
                            <th scope="col">船龄（年）</th>
                            <th scope="col">发布日期</th>
                        </tr>
                        </thead>
                        <tbody>
                        @foreach($solded as $item)
                            <tr>
                                <th scope="row">{{$item->type}}</th>
                                <td>{{$item->loads}}</td>
                                <td>{{$item->old}}</td>
                                <td>{{$item->creat_at}}</td>
                            </tr>
                        @endforeach
                        </tbody>
                    </table>
                </div>
            </div>

        </div>

        <div class="row info">
            <div class="col-sm-4">
                <div class="box">
                    <div class="title">
                        船舶成交报告查询
                    </div>
                    <div style="padding: 3rem">
                        <form>
                            <div class="form-group">
                                <label for="exampleInputEmail1">船舶类型</label>
                                <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="船舶类型">
                            </div>
                            <div class="form-group">
                                <label for="exampleInputPassword1">载重</label>
                                <input type="password" class="form-control" id="exampleInputPassword1" placeholder="载重">
                            </div>
                            <div class="form-group">
                                <label for="exampleInputPassword1">船龄</label>
                                <input type="password" class="form-control" id="exampleInputPassword1" placeholder="船龄">
                            </div>

                            <button type="submit" class="btn btn-primary">查询</button>
                        </form>
                    </div>
                </div>
            </div>
            <div class="col-sm-8">
                <div class="part-title-box">
                    <div class="part-title">成交公示</div>
                </div>
                <div class="box">
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <th scope="col">编号</th>
                            <th scope="col">船舶类型</th>
                            <th scope="col">载重(吨)</th>
                            <th scope="col">船龄(年)</th>
                            <th scope="col">造船厂</th>
                            <th scope="col">成交价(万)</th>
                            <th scope="col">交易时间</th>
                        </tr>
                        </thead>
                        <tbody>
                        @foreach($president as $item)
                            <tr>
                                <th scope="row">{{$item->id}}</th>
                                <th scope="row">{{$item->type}}</th>
                                <td>{{$item->loads}}</td>
                                <td>{{$item->old}}</td>
                                <td>{{$item->make_by}}</td>
                                <td>{{$item->price}}</td>
                                <td>{{$item->creat_at}}</td>
                            </tr>
                        @endforeach
                        </tbody>
                    </table>
                </div>
            </div>

        </div>
    </div>
    <script src="{{asset('js/lib/echarts.simple.min.js')}}"></script>
    <script src="{{asset('js/transaction.js')}}"></script>
@endsection
